class Person:
  def __init__(self,name,age):
    self.name = name
    self.__age = age

  def say_age(self):
    print(self.name,"的年龄是：",self.__age)

  def say_name(self):
    print("我是",self.name)


class Student(Person):

  def __init__(self,name,age,score):
    Person.__init__(self,name,age) 
    self.score = score

  def say_score(self):
    print(self.name,"的分数是：",self.score)

  def say_name(self):   #重写父类的方法
    print("报告老师，我是",self.name)

s1 = Student("张三",15,85)
s1.say_score()
s1.say_name()
s1.say_age()
# 张三 的分数是： 85
# 报告老师，我是 张三
# 张三 的年龄是： 15
print(dir(s1))
# ['_Person__age',......,'name', 'say_age', 'say_name', 'say_score', 'score']
